From: Carlos Garnacho Date: Mon, 27 Jun 2022 11:55:34 +0000 (+0200) Subject: keyboard: Set ornament on selected item in OSK languages popup menu X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~297 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=35ff4bfe3cdf76dc1bff9a56911786b96979a3f8;p=gnome-shell.git keyboard: Set ornament on selected item in OSK languages popup menu There is no hint about the currently selected language, but this exists in the mockups. Add a dot ornament on the language that is currently selected at the time of showing the OSK languages popup. Since this popup is created from scratch every time it is shown, and the popup is torn down with the OSK during replacement. This also works for further times the languages popup is shown. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5598 Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 499bc28a9..c819265eb 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -244,6 +244,9 @@ var LanguageSelectionPopup = class extends PopupMenu.PopupMenu { inputSourceManager.activateInputSource(is, true); }); item.can_focus = false; + item.setOrnament(is === inputSourceManager.currentSource + ? PopupMenu.Ornament.DOT + : PopupMenu.Ornament.NONE); } this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());